Skip to main content

User Identification in Events

How to Cross-Reference Information to Identify the User

In many operational scenarios, identifying the user responsible for an event is essential for analysis, contextual actions, and auditing. Below, we list possible approaches to perform this identification based on secure technical practices compatible with privacy guidelines.

1 - Using notificationToken:

This function expects a String parameter, which represents the user's notification token. On iOS, this token is provided by APNS (Apple Push Notification Service), while on Android, it is obtained through Firebase Cloud Messaging.

To retrieve this token, you can use the Firebase Messaging plugin for Flutter and invoke the getToken method. Here's an example to guide you:

Android

void main() async {
FirebaseMessaging.instance.getToken().then((value) {
if (value != null) {
GroupLinkSDKPlugin().setNotificationToken(value);
}
});
runApp(const MyApp());
}

iOS

void main() async {
FirebaseMessaging.instance.getAPNSToken().then((value) => {
if (value != null) {
GroupLinkSDKPlugin().setNotificationToken(value);
}
});
runApp(const MyApp());
}

2 - Using notification_name:

This function expects a String parameter that represents the notification name associated with the device. This name is a customizable identifier you can use to manage or label notifications for a specific user or context.

We strongly recommend not using sensitive information in the notification_name. Instead, use unique identifiers that are properly encrypted or obfuscated. For example, using the user's session-id is a safer approach that helps ensure security and privacy when identifying devices.

Setting user notification_name:

void main() async {
await GroupLinkSDKPlugin().setNotificationName(notificationName);
runApp(const MyApp());
}

Getting the user notification_name:

void main() async {
String? notificationName = await GroupLinkSDKPlugin().getNotificationName();
runApp(const MyApp());
}

3 - Getting the user given userID

The userID is an optional String identifier that is unique to each user within the Group Link network. By utilizing this ID, you can identify when a particular user approaches one of our devices.

void main() async {
String? userID = await GroupLinkSDKPlugin().getUserId();
runApp(const MyApp());
}